package com.zs.lib_base.utils

/**
 * descrition:两次点击按钮之间的点击间隔不能少于600毫秒
 */
private const val MIN_CLICK_DELAY_TIME: Int = 600
private var lastClickTime: Long = 0

fun repeatClick(): Boolean {
    var flag = false
    val curClickTime = System.currentTimeMillis()
    if (curClickTime - lastClickTime >= MIN_CLICK_DELAY_TIME) {
        flag = true
    }
    lastClickTime = curClickTime
    return flag
}